package cn.hnevc.shuqiangjian;

import java.io.File;

public class ExampleTest56 {
	public static void main(String[] args) {
		File file= new File("C:\\Users\\Administrator\\workspace\\Example13\\txt");
		deleteDir(file);
	}
	public static void deleteDir(File dir) {
		if (dir.exists()) {
			File[] files=dir.listFiles();
			for(File file:files){
				if (file.isDirectory()) {
					deleteDir(file);
				}else {
					file.delete();
				}
			}
			dir.delete();
		}
	}
}
